#ifndef __SetState_H__
#define __SetState_H__

#include "typeDef.h"

class CBaseMainManager;
class CMyHash;
class SetCheckSta;

class CSetState
{
public:
    CSetState();
    ~CSetState();
    void     Init(CMyHash*  pConfig, CBaseMainManager* pBaseManger);
    STATUS   ConnectSetByKey(int key, bool reConnect = false);
    STATUS   CheckSet(int key);
    void     RecvCheckSet(int key, const char* msg, int msgLen);
    STATUS   StartTest(int key);
    void     RecvTest(int key, const char* msg, int msgLen);
    void     RecvMessage(int key, const char* msg, int msgLen);
    STATUS   StopSet(int key);
    void     RecvStopSet(int key, const char* msg, int msgLen);
private:
    SetCheckSta*  findStaBySrcIp(int srcIp);
private:
     CMyHash*  m_pConfig;
     CBaseMainManager* m_pBaseManger;
};

#endif